package com.bt.mes.common.core.context;

import java.util.List;

import com.bt.mes.common.bean.entity.HisXml;

public class AppContext {
	private static ThreadLocal<String> currServiceName = new ThreadLocal<String>();
	private static ThreadLocal<String> currEventNumber = new ThreadLocal<String>();
	private static ThreadLocal<List<HisXml>> currHisXmlList = new ThreadLocal<List<HisXml>>(); 


	public static String getCurrServiceName() {
		return (String) currServiceName.get();
	}

	public static void setCurrServiceName(String serviceName) {
		currServiceName.set(serviceName);
	}

	public static String getCurrEventNumber() {
		return (String) currEventNumber.get();
	}


	public static void setCurrEventNumber(String eventNo) {
		currEventNumber.set(eventNo);
	}
	
	

	public static List<HisXml> getCurrHisXmlList() {
		return (List<HisXml>)currHisXmlList.get();
	}

	public static void setCurrHisXmlList( List<HisXml> hisXmlList) {
		currHisXmlList.set(hisXmlList);
	}


	public static void clear() {
		currServiceName.set(null);
		currEventNumber.set(null);
		currHisXmlList.set(null);
	}
}